import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld' // @ 表示根目录
import Hello from '@/components/Hello' // 导入自定义的组件
import MyTable from '@/components/MyTable'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/hello', //路由地址
      name: 'Hello', //路由名
      component: Hello //组件
    },
    {
      path: '/table',
      name: 'MyTable',
      component: MyTable
    }
  ]
})
